home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
301-325
/
309
/
csh
/
globals.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-14
|
4KB
|
105 lines
/*
* GLOBALS.C
*
* (c)1986 Matthew Dillon 9 October 1986
*
* Version 2.07M by Steve Drew 10-Sep-87
*
* Most global variables.
*
* Version 4.00A by Carlo Borreo & Cesare Dieni 13-Jan-90
*
*/
char v_titlebar []="_titlebar"; /* Window title */
char v_prompt []="_prompt"; /* your prompt (ascii command) */
char v_hist []="_history"; /* set history depth (value) */
char v_histnum []="_histnum"; /* set history numbering var */
char v_debug []="_debug"; /* set debug mode */
char v_verbose []="_verbose"; /* set verbose for source files */
char v_stat []="_maxerr"; /* worst return value to date */
char v_lasterr []="_lasterr"; /* return value from last comm. */
char v_cwd []="_cwd"; /* current directory */
char v_except []="_except"; /* "nnn;command" */
char v_passed []="_passed"; /* passed arguments to source file */
char v_path []="_path"; /* search path for external commands */
char v_gotofwd []="_gtf"; /* set name for fwd goto name */
char v_linenum []="_linenum"; /* name for forline line # */
struct HIST *H_head, *H_tail; /* HISTORY lists */
struct PERROR Perror[]= { /* error code->string */
103, "Insufficient free storage",
105, "Task table full",
120, "Argument line invalid or too long",
121, "File is not an object module",
122, "Invalid resident library during load",
201, "No default directory",
202, "Object in use",
203, "Object already exists",
204, "Directory not found",
205, "Object not found",
206, "Bad stream name",
207, "Object too large",
209, "Action not known",
210, "Invalid stream component name",
211, "Invalid object lock",
212, "Object not of required type",
213, "Disk not validated",
214, "Disk write protected",
215, "Rename across devices",
216, "Directory not empty",
217, "Too many levels",
218, "Device not mounted",
219, "Seek error",
220, "Comment too long",
221, "Disk full",
222, "File delete protected",
223, "File write protected",
224, "File read protected",
225, "Not a DOS disk",
226, "No disk",
/* custom error messages */
500, "Bad arguments",
501, "Label not found",
502, "Must be within source file",
503, "Syntax Error",
504, "Redirection error",
505, "Pipe error",
506, "Too many arguments",
507, "Destination not a directory",
508, "Cannot mv a filesystem",
509, "Error in command name",
510, "Bad drive name",
511, "Illegal number",
0, NULL
};
char *av[MAXAV]; /* Internal argument list */
long Src_base[MAXSRC]; /* file pointers for source files */
long Src_pos[MAXSRC]; /* seek position storage for same */
char If_base[MAXIF]; /* If/Else stack for conditionals */
int H_len, H_tail_base; /* History associated stuff */
int H_stack; /* AddHistory disable stack */
int E_stack; /* Exception disable stack */
int Src_stack, If_stack; /* Stack Indexes */
int forward_goto; /* Flag for searching for foward lables */
int ac; /* Internal argc */
int debug; /* Debug mode */
int disable; /* Disable com. execution (conditionals)*/
int Verbose; /* Verbose mode for source files */
int Lastresult; /* Last return code */
int Exec_abortline; /* flag to abort rest of line */
int Quit; /* Quit flag */
long Cout, Cin; /* Current input and output file handles*/
long Cout_append; /* append flag for Cout */
char *Cin_name, *Cout_name; /* redirection input/output name or NULL*/
char *Pipe1, *Pipe2; /* the two pipe temp. files */
struct Process *Myprocess;
struct CommandLineInterface *Mycli;
int S_histlen = 20; /* Max # history entries */
unsigned int options;